x86/public: move XEN_ACPI_ in a new header
authorBertrand Marquis <bertrand.marquis@arm.com>
Tue, 6 Sep 2022 14:04:34 +0000 (16:04 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 6 Sep 2022 14:04:34 +0000 (16:04 +0200)
commit48f35317c2e2707fc66a839690fe41e6f16180de
treeafd3b34778da1b4d3ee0609bb11421956e61f2de
parentad0838f4499820db613370feea354ac484544b11
x86/public: move XEN_ACPI_ in a new header

When Xen is compiled for x86 on an arm machine, libacpi build is failing
due to a wrong include path:
- arch-x86/xen.h includes xen.h
- xen.h includes arch-arm.h (as __i386__ and __x86_64__ are not defined
but arm ones are).

To solve this issue move XEN_ACPI_ definitions in a new header
guest-acpi.h that can be included cleanly by mk_dsdt.c.
Inside this header, only protect the definitions using ifdef
__XEN_TOOLS__ as the defines are not used anywhere in the hypervisor and
are not expected to be.

Previous users needing any of the XEN_ACPI_ definitions will now need to
include arch-x86/guest-acpi.h instead of arch-x86/xen.h

Fixes: d6ac8e22c7c5 ("acpi/x86: define ACPI IO registers for PVH guests")
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Henry Wang <Henry.Wang@arm.com>
tools/libacpi/mk_dsdt.c
xen/include/public/arch-x86/guest-acpi.h [new file with mode: 0644]
xen/include/public/arch-x86/xen.h